const Controller=require('egg').Controller;

const talkurl=' '

class DingtalkController extends Controller{
    async send(){
        //参数类型
        //https://open-doc.dingtalk.com/docs/doc.htm?spm=a219a.7629140.0.0.karFPe&treeId=257&articleId=105735&docType=1
        const result=await this.app.curl(talkurl,{
            method:'POST',
            dataType:'json',
            contentType: 'json',
            data:{
                "msgtype": "text",
                    "text": {
                        "content": "我就是我,  @18515062912X 是不一样的烟火"
                    },
                    "at": {
                        "atMobiles": [
                            "18515062912X"
                        ], 
                        "isAtAll": false//@所有人时:true,否则为:false
                    }
            }
        })
        this.ctx.body=result.data;
    }   
}

module.exports=DingtalkController;